package de.jmda.gen.java.impl;

import javax.validation.constraints.NotNull;

import de.jmda.gen.java.DeclaredStaticMethodGenerator;
import de.jmda.gen.java.StaticMethodDeclarationGenerator;

public class DefaultStaticMethodDeclarationGenerator
		extends DefaultMethodDeclarationGenerator
		implements StaticMethodDeclarationGenerator
{
	public DefaultStaticMethodDeclarationGenerator()
  {
		this(new DefaultDeclaredStaticMethodGenerator());
  }

	public DefaultStaticMethodDeclarationGenerator(
      @NotNull DeclaredStaticMethodGenerator generator)
  {
	  super(notNull(generator));
  }
	
	private static DeclaredStaticMethodGenerator notNull(
			DeclaredStaticMethodGenerator generator)
	{
		if (generator == null)
		{
			return new DefaultDeclaredStaticMethodGenerator();
		}
		
		return generator;
	}
}